package com.twu.biblioteca;

import java.util.List;

public class Menu {

    private List<LibraryOption> libraryOptions;
    public Menu(List<LibraryOption> libraryOptions) {
        this.libraryOptions = libraryOptions;
    }

    public List<LibraryOption> getLibraryOptions() {
        return this.libraryOptions;
    }

    public LibraryOption optionSelect(String optionName) {
        for (LibraryOption libraryOption : libraryOptions){
            if(optionName.equals(libraryOption.getName())){
                return libraryOption;
            }
        }
        return null;
    }
}
